#include "StdAfx.h"
#include "Size.h"

#include <assert.h>

namespace gfx {

Size::Size(void) : width_(0), height_(0)
{
}

Size::Size(int width, int height)
{
	SetSize(width, height);
}

Size::Size(const Size& size)
{
	*this = size;
}

Size::~Size(void)
{
}

void Size::SetWidth(int width)
{
	assert(width >= 0);
	width_ = width;
}
void Size::SetHeight(int height)
{
	assert(height >= 0);
	height_ = height;
}

Size& Size::operator=(const Size& rhs)
{
	this->SetSize(rhs.width_, rhs.height_);
	return *this;
}

bool Size::operator==(const Size& rhs) const
{
	return this->width_ == rhs.width_ && this->height_ == rhs.height_;
}

bool Size::operator!=(const Size& rhs) const
{
	return !(*this == rhs);
}

} // namespace gfx